package com.heima.stringbuilder;

public class StringB {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		String s = "baidu";
		System.out.println(s);
		change(s);
		System.out.println(s);
		String s2 = change2(s);
		System.out.println(s2);
		
		System.out.println("-----");
		
		StringBuffer sb = new StringBuffer();
		sb.append(".com2");
		change(sb);
		System.out.println(sb);
	}

	private static void change(StringBuffer sb) {
		sb.append("www");
	}

	private static String change2(String s) {
		s += ".com";
		return s;
	}

	private static void change(String s) {
		s += ".com";
	}
}
